package com.kfit.java8.interfaces;

import com.kfit.java8.interfaces.impl.CalculatorFactory;
import com.kfit.java8.interfaces.impl.CalculatorImpl;

public class TestCalculator {
	public static void main(String[] args) {
		Calculator calculator = new CalculatorImpl();
		double rs = calculator.addThree(1, 2, 3);
		System.out.println("rs="+rs);
		
		double rs1 = CalculatorFactory.getInstance().add(2, 3);
		System.out.println("rs1="+rs1);
		
		double rs2 = Calculator.getInstance().add(2, 3);
		System.out.println("rs2="+rs2);
		
		System.out.println(Calculator.randNumber(3, 10));

	}
}
